Adding some more judges, here and there.
[and.git] / UVa / 11590 - Prefix lookup / correctinput.cpp
blob39afebd25a170d8062d4816f2fd869321d87611e
1 using namespace std;
2 #include <algorithm>
3 #include <iostream>
4 #include <iterator>
5 #include <sstream>
6 #include <fstream>
7 #include <cassert>
8 #include <climits>
9 #include <cstdlib>
10 #include <cstring>
11 #include <string>
12 #include <cstdio>
13 #include <vector>
14 #include <cmath>
15 #include <queue>
16 #include <deque>
17 #include <stack>
18 #include <list>
19 #include <map>
20 #include <set>
22 template <class T> string toStr(const T &x){ stringstream s; s << x; return s.str(); }
23 template <class T> int toInt(const T &x){ stringstream s; s << x; int r; s >> r; return r; }
25 #define For(i, a, b) for (int i=(a); i<(b); ++i)
26 #define foreach(x, v) for (typeof (v).begin() x = (v).begin(); x != (v).end(); ++x)
27 #define D(x) cout << #x " is " << x << endl
30 int main(){
31 int n, m;
32 while (cin >> n >> m && (n || m)){
33 assert(1 <= n && n <= 20000);
34 assert(1 <= m && m <= 20000);
35 string s;
36 getline(cin, s);
37 assert(s == "");
38 for (int i=0; i<n; ++i){
39 getline(cin, s);
40 assert(s.size() > 1 && s[0] != '*');
43 int k;
44 cin >> k;
45 assert(0 < k && k < 1000);
46 getline(cin, s);
47 assert(s == "");
49 for (int i=0; i<k; ++i){
50 getline(cin, s);
51 assert(s.size() > 0);
54 getline(cin, s);
55 assert(s == "");
57 printf("Good!\n");
59 return 0;